package io.renren.modules.generator.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.generator.dao.NoticeinfoDao;
import io.renren.modules.generator.entity.NoticeinfoEntity;
import io.renren.modules.generator.service.NoticeinfoService;
import io.renren.util.UUIDUtil;



@Service("noticeinfoService")
public class NoticeinfoServiceImpl extends BaseServiceImpl implements NoticeinfoService {
	@Autowired
	private NoticeinfoDao noticeinfoDao;
	
	@Override
	public NoticeinfoEntity queryObject(String noticeno){
		return noticeinfoDao.queryObject(noticeno);
	}
	
	@Override
	public List<NoticeinfoEntity> queryList(Map<String, Object> map){
		return noticeinfoDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return noticeinfoDao.queryTotal(map);
	}
	
	@Override
	public void save(NoticeinfoEntity noticeinfo){
		noticeinfo.setNoticeno(UUIDUtil.getOrderIdByUUId());
		logger.info(noticeinfo.getNoticeno());
		noticeinfoDao.save(noticeinfo);
	}
	
	@Override
	public void update(NoticeinfoEntity noticeinfo){
		noticeinfoDao.update(noticeinfo);
	}
	
	@Override
	public void delete(String noticeno){
		noticeinfoDao.delete(noticeno);
	}
	
	@Override
	public void deleteBatch(String[] noticenos){
		noticeinfoDao.deleteBatch(noticenos);
	}
	
}
